package com.rzl.expense.expense.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.EleAmortizeInfoMapper;
import com.rzl.expense.expense.domain.EleAmortizeInfo;
import com.rzl.expense.expense.service.IEleAmortizeInfoService;

/**
 * 电费应付月报Service业务层处理
 * 
 * @author expense
 * @date 2024-11-30
 */
@Service
public class EleAmortizeInfoServiceImpl implements IEleAmortizeInfoService 
{
    @Autowired
    private EleAmortizeInfoMapper eleAmortizeInfoMapper;

    /**
     * 查询电费应付月报
     * 
     * @param id 电费应付月报主键
     * @return 电费应付月报
     */
    @Override
    public EleAmortizeInfo selectEleAmortizeInfoById(Long id)
    {
        return eleAmortizeInfoMapper.selectEleAmortizeInfoById(id);
    }

    /**
     * 查询电费应付月报列表
     * 
     * @param eleAmortizeInfo 电费应付月报
     * @return 电费应付月报
     */
    @Override
    public List<EleAmortizeInfo> selectEleAmortizeInfoList(EleAmortizeInfo eleAmortizeInfo)
    {
        return eleAmortizeInfoMapper.selectEleAmortizeInfoList(eleAmortizeInfo);
    }

    /**
     * 新增电费应付月报
     * 
     * @param eleAmortizeInfo 电费应付月报
     * @return 结果
     */
    @Override
    public int insertEleAmortizeInfo(EleAmortizeInfo eleAmortizeInfo)
    {
        return eleAmortizeInfoMapper.insertEleAmortizeInfo(eleAmortizeInfo);
    }

    /**
     * 修改电费应付月报
     * 
     * @param eleAmortizeInfo 电费应付月报
     * @return 结果
     */
    @Override
    public int updateEleAmortizeInfo(EleAmortizeInfo eleAmortizeInfo)
    {
        return eleAmortizeInfoMapper.updateEleAmortizeInfo(eleAmortizeInfo);
    }

    /**
     * 批量删除电费应付月报
     * 
     * @param ids 需要删除的电费应付月报主键
     * @return 结果
     */
    @Override
    public int deleteEleAmortizeInfoByIds(Long[] ids)
    {
        return eleAmortizeInfoMapper.deleteEleAmortizeInfoByIds(ids);
    }

    /**
     * 删除电费应付月报信息
     * 
     * @param id 电费应付月报主键
     * @return 结果
     */
    @Override
    public int deleteEleAmortizeInfoById(Long id)
    {
        return eleAmortizeInfoMapper.deleteEleAmortizeInfoById(id);
    }
    public int deleteEleAmortizeInfoByDate(String[] currentDate){
        return eleAmortizeInfoMapper.deleteEleAmortizeInfoByDate(currentDate[0],currentDate[1]);
    }



    @Override
    public void batchEleAmortizeInfo(List<EleAmortizeInfo> list)
    {

         eleAmortizeInfoMapper.batchEleAmortizeInfo(list);
    }


}
